/**
 * Created by Administrator on 2017/5/10 0010.
 */
define([],function(){
    var tpl={};
    tpl.init = function () {
        var html = '';
        html += temList();
        return html;
    }
    var temList=function(){
        return '<script id="temList" type="text/html">' +
                 '{{each data as value i}}' +
                    '<div class="monitor-user-card monitor-temperature" id="{{value.userId}}" gender="{{value.gender}}">'+
                        '<div class="bg-heart bg-tem">'+
                            '<i class="fa fa-thermometer-half" aria-hidden="true"></i>'+
                        '</div>'+
                        '<div class="card-heading">'+
                            '<div>'+
                                '<img src="page/department/img/title.png" alt=""/>'+
                            '</div>'+
                            '<div>'+
                                '<font class="user-name">{{value.userName}}</font>'+
                                '<font class="monitor-time">{{value.testTimeDesc}}</font>'+
                                '<br/>'+
                                '<font class="monitor-duration">时长:{{value.timeLong}}</font>'+
                            '</div>'+
                        '</div>'+
                        '<div class="card-bodys">'+
                            '<div class="card-body">'+
                            '{{if value.valueMax > value.tempalarmTop}}'+
                            '<div class="monitor-number text-left warn">{{value.valueMax}}</div>'+
                            '{{else}}'+
                            '<div class="monitor-number text-left">{{value.valueMax}}</div>'+
                            '{{/if}}'+
                            '<div class="monitor-unit text-left">最高值(℃)</div>'+
                            ' </div>' +
                            ' <div class="card-body">'+
                            '{{if value.finalValue > value.tempalarmTop}}'+
                            '<div class="monitor-number text-left warn">{{value.finalValue}}</div>'+
                            '{{else}}'+
                            '<div class="monitor-number text-left">{{value.finalValue}}</div>'+
                            '{{/if}}'+
                            '<div class="monitor-unit text-right">最终值(℃)</div>'+
                            '</div>'+
                        '</div>'+
                    '</div>'+
                 '{{/each}}' +
        '</script>';
    };
    return tpl;
});